//Project: Tenpenny Stories version 0.2 beta
//Coding by: Joshua Black aka JABHackSoul
//Questions email to jabhacksoul@yahoo.com
//Audio Splicing: Vincent Black aka ToonSkull/Evol Child 
//Additional Voices: Vincent Black and Brian Black aka Our Dad as Pendelbury
//Scripting Assistance: ZAZ & ceedj on GTAforums.com
//Ideas used: (coming soon!)  Submit Ideas to http://www.thegtaplace.com care of ToonSkull
//Gunia Pig Beta Testers here: (coming soon!) Bugs http://www.thegtaplace.com care of Jabhacksoul
//This script was produced for educational purposes.
//IF you redistribute DON'T REMOVE these comments they help others learn.
//You can add as much as you like but comment on the changes and improvements you made.
// Don't remove old buggy code just comment it out and explain why it was removed.
DEFINE MISSIONS 1              // Total Missions Available
DEFINE MISSION 0 AT @MISSN_01  //PLUG THE LEAK

DEFINE EXTERNAL_SCRIPTS 0 

DEFINE UNKNOWN_EMPTY_SEGMENT 0

DEFINE UNKNOWN_THREADS_MEMORY 500

{$VERSION 3.1.0027}
var
 $PLAYER_CHAR: Player
end // var 
//Main thread starts here
03A4: name_thread 'MAIN' 
//Set the screen BLACK immediately
016A: fade 0 time 0           
01F0: set_max_wanted_level_to 6 
0111: toggle_wasted_busted_check 0 
00C0: set_current_time_hours_to 8 minutes_to 0 
//Loads Tenpenny as #SPECIAL01 or 290
023C: load_special_actor 'TENPEN' as 1 
//Create Player at Station
04E4: unknown_refresh_game_renderer_at 1541 -1675.4 
Camera.SetAtPos(1541.156, -1675.352, 13.55)
//Player Charater is Defined
$PLAYER_CHAR = Player.Create(#NULL, 1541.156, -1675.352, 13.552)
Player.SetClothes($PLAYER_CHAR, "VEST", "VEST", Torso)
Player.SetClothes($PLAYER_CHAR, "JEANSDENIM", "JEANS", Legs)
Player.SetClothes($PLAYER_CHAR, "SNEAKERBINCBLK", "SNEAKER", Shoes)
Player.SetClothes($PLAYER_CHAR, "PLAYER_FACE", "HEAD", Head)  
Player.Build($PLAYER_CHAR)
//Changes the player to ped model 290 Tenpenny
09C7: change_player $PLAYER_CHAR model_to 290 
01F5: $PLAYER_ACTOR = create_player_actor $PLAYER_CHAR 
07AF: $PLAYER_GROUP = player $PLAYER_CHAR group 

01B6: set_weather 1 
0001: wait 0 ms 
//We shut down control for the cameras to work
01B4: toggle_player $PLAYER_CHAR can_move false  
04BB: select_interior 0 
0629: change_integer_stat 181 to 4 
016C: restart_if_wasted_at 2027.77 -1420.52 15.99 angle 137.0 town_number 0 
016D: restart_if_busted_at 1550.68 -1675.49 14.51 angle 90.0 town_number 0 
// Note: your missions have to use the variable defined here
0180: set_on_mission_flag_to $ONMISSION  
0004: $DEFAULT_WAIT_TIME = 250
03E6: remove_text_box 
$MISSION_1 = 2
// START GAME
$ONMISSION = 0 
start_mission 0                 //First Mission and Only Mission

:MAIN_LOOP
0001: wait $DEFAULT_WAIT_TIME ms
00BF: $TIME_HOURS = current_time_hours, $TIME_MINS = current_time_minutes

end

0002: jump @MAIN_LOOP 

//--------------------------Kill Pendelbury "PLUG THE LEAK"----------------------
:MISSN_01
thread 'MISSN_01' 
$ONMISSION = 1
0169: set_fade_color_RGB 0 0 0 
fade 0 1000 
 
  
:MISSION_01_020
wait 0
if 
816B:   not fading 
jf @MISSION_01_020

gosub @MISSN_01_108             // Init Mission 
if 
wasted_or_busted 
else_jump @MISSN_01_105 
$CRASH_MARKER = Marker.CreateIconAndSphere(16, 1541.156, -1675.352, 13.552)

:MISSN_01_105
gosub @MISSN_01_900             // End Mission Destroy All
end_thread 

:MISSN_01_108 

100@ = 0 
Player.ClearWantedLevel($PLAYER_CHAR)
//JABTPM is a custom table I added to the american.gxt for the subtitles.
054C: use_GXT_table 'JABTPM' 
//Load Models 
0395: clear_area 1 at 1535.743 -1678.094 13.09914 radius 50.0 
023C: load_special_actor 'PULASKI' as 2 
023C: load_special_actor 'HERN' as 3
Model.Load(#COPBIKE)
Model.Load(#COPCARLA)
Model.Load(#DESERT_EAGLE)
Model.Load(#COLT45)
038B: load_requested_models 
//Check for Models Loading
:MISSN_01_110
if or
not Model.Available(#COPBIKE)
not Model.Available(#COPCARLA)
not Model.Available(#DESERT_EAGLE)
not Model.Available(#COLT45)
823D:   not special_actor 2 loaded 
823D:   not special_actor 3 loaded 
else_jump @MISSN_01_120 
wait 0 
jump @MISSN_01_110 
//Setup Bike Car and Actors
:MISSN_01_120
Actor.PutAt($PLAYER_ACTOR, 1541.156, -1676.0, 13.552) 
Actor.Angle($PLAYER_ACTOR) = 0  
0674: set_car_model #COPCARLA numberplate "_CRASH_"
13@ = Car.Create(#COPCARLA,  1535.743, -1678.094, 13.09914)
14@ = Car.Create(#COPBIKE, 1535.743, -1665.094, 13.09914)
Car.SetImmunities(13@, 0, 1, 0, 0, 0) 
Car.Angle(13@) = 0                       //Headed North
Car.DoorStatus(13@, 0)                   //No locked doors
053F: set_car 13@ tires_vulnerability 0  //No popped tries
//Define and place Pendelbury 6 is COP
15@ = Actor.Create(6, #LAPD1, 1541.156, -1674.0, 13.552)
Actor.Health(15@) = 200
Actor.Angle(15@) = 180.0
//This creates a red marker over his head and a radar blip.
0187: 90@ = create_marker_above_actor 15@
07E0: set_marker 90@ type_to 0
0165: set_marker 90@ color_to 0 
05BF: AS_actor 15@ look_at_actor $PLAYER_ACTOR 15000 ms 
//Define and place Pukaski 8 is GROVE later I found it was better to use 24
16@ = Actor.Create(8, #SPECIAL02, 1541.9, -1674.352, 13.552)
Actor.Health(16@) = 1500
Actor.Angle(16@) = 130.0
039E: set_actor 16@ locked 1 while_in_car 
0526: set_actor 16@ stay_in_car 1 
05BF: AS_actor 16@ look_at_actor 15@ 2500 ms 
//Define and place Hernandez 8 is GROVE
17@ = Actor.Create(8, #SPECIAL03, 1542.0, -1675.2, 13.552)
Actor.Health(17@) = 1500
Actor.Angle(17@) = 45.0 
039E: set_actor 17@ locked 1 while_in_car 
0526: set_actor 17@ stay_in_car 1
0746: set_acquaintance 0 of_actors_pedtype 8 to_actors_pedtype 24 // see ped.dat 
0746: set_acquaintance 0 of_actors_pedtype 24 to_actors_pedtype 8 // see ped.dat 
01B2: give_actor $PLAYER_ACTOR weapon 24 ammo 170
01B2: give_actor 16@ weapon 22 ammo 170
01B2: give_actor 17@ weapon 22 ammo 170
Player.CanMove($PLAYER_CHAR) = False

:MISSN_01_140  //Cut Scene 01

0707: start_scene_skip_to @MISSN_01_145 
gosub @MISSN_01_200     //The Conversation Cut Scene
:MISSN_01_145
0701: end_scene_skip 
03E6: remove_text_box 
00BE: text_clear_all  
02A3: enable_widescreen 0

Camera.Restore_WithJumpCut
Camera.SetBehindPlayer
03E5: show_text_box 'PTL12'  
//Pendelbury gets on bike
05CB: AS_actor 15@ enter_car 14@ as_driver -1 ms 
//Pulaski and Hernandez gets in the car
05CA: AS_actor 16@ enter_car 13@ passenger_seat 0 -1 ms
05CA: AS_actor 17@ enter_car 13@ passenger_seat 2 -1 ms

//Start Mission Play
:MISSN_01_150
if
Actor.DrivingPoliceVehicle(15@) 
wait 0
else_jump @MISSN_01_150

03E6: remove_text_box 
05CB: AS_actor $PLAYER_ACTOR enter_car 13@ as_driver -1 ms 

:MISSN_01_160
if
Actor.DrivingPoliceVehicle($PLAYER_ACTOR) 
wait 0
else_jump @MISSN_01_160
Player.CanMove($PLAYER_CHAR) = True

:MISSN_01_190
if and 
not Actor.Dead(15@)
Actor.DrivingPoliceVehicle(15@)
jf @MISSN_01_400            //Killed Pendelbury Mission Complete
//I have always felt this mission is far too easy to knock the AI off the bike or kill him
//since the AI seems to manage to fall off the bike all on its own.  Vinny suggested putting up
//a minimum distance check to see if you are close enough to take advantage of the AI falling off
//the bike. 
wait 0 
gosub @MISSN_01_300         //The Pursuit Path                
jump @MISSN_01_190

//Cut Scene 01 "The Conversation"
:MISSN_01_200
// Pans camera down from skyview

02A3: enable_widescreen true 
0920: point_camera 1541.156 -1670.352 28.7047 transverse_to 1541.156 -1674.352 14.5 time 4000 mode 1  
03CF: load_wav 45200 as 1 
0169: set_fade_color_RGB 0 0 0 
fade 1 1000 

:MISSN_01_205
wait 0
if 
816B:   not fading 
jf @MISSN_01_205

gosub @MISSN_01_280 //wait for wav to load
03D1: play_wav 1 
0967: actor $PLAYER_ACTOR move_mouth -1 ms
0605: actor $PLAYER_ACTOR perform_animation_sequence "IDLE_CHAT" IFP_file "PED" 4.0 loop 0 0 0 0 time -1
00BC: show_text_highpriority GXT 'PTL01' time 15000 flag 1 
gosub @MISSN_01_290 //wait for wav to load
0968: actor $PLAYER_ACTOR stop_mouth 
067C: put_camera_on_actor 15@ with_offset -0.3 2.0 1.0 rotation 0.0 0.0 0.0 0.0 2        
03CF: load_wav 45201 as 1 
gosub @MISSN_01_280 //wait for wav to load
03D1: play_wav 1 
0967: actor 15@ move_mouth -1 ms
0605: actor 15@ perform_animation_sequence "IDLE_TIRED" IFP_file "PED" 4.0 loop 0 0 0 0 time -1
00BC: show_text_highpriority GXT 'PTL02' time 15000 flag 1 
gosub @MISSN_01_290 //wait for wav to load
067C: put_camera_on_actor $PLAYER_ACTOR with_offset -0.3 2.0 1.0 rotation 0.0 0.0 0.0 0.0 2
0968: actor 15@ stop_mouth
03CF: load_wav 45202 as 1 
gosub @MISSN_01_280 //wait for wav to load
0967: actor $PLAYER_ACTOR move_mouth -1 ms
03D1: play_wav 1 
00BC: show_text_highpriority GXT 'PTL03' time 15000 flag 1 
gosub @MISSN_01_290 //wait for wav to load
067C: put_camera_on_actor 15@ with_offset -0.3 2.0 1.0 rotation 0.0 0.0 0.0 0.0 2        
03CF: load_wav 45203 as 1 
gosub @MISSN_01_280 //wait for wav to load
03D1: play_wav 1 
0605: actor $PLAYER_ACTOR perform_animation_sequence "IDLE_STANCE" IFP_file "PED" 4.0 loop 0 0 0 0 time -1
00BC: show_text_highpriority GXT 'PTL04' time 15000 flag 1 
gosub @MISSN_01_290 //wait for wav to load
0968: actor $PLAYER_ACTOR stop_mouth
067C: put_camera_on_actor 16@ with_offset 0.0 5.0 2.0 rotation 0.0 0.0 0.0 0.0 2         
03CF: load_wav 45204 as 1 
gosub @MISSN_01_280 //wait for wav to load
0967: actor 15@ move_mouth -1 ms
03D1: play_wav 1 
0605: actor 15@ perform_animation_sequence "IDLE_CHAT" IFP_file "PED" 4.0 loop 0 0 0 0 time -1
00BC: show_text_highpriority GXT 'PTL05' time 15000 flag 1 
gosub @MISSN_01_290 //wait for wav to load
0968: actor 15@ stop_mouth
03CF: load_wav 45205 as 1 
gosub @MISSN_01_280 //wait for wav to load
03D1: play_wav 1 
0967: actor $PLAYER_ACTOR move_mouth -1 ms
0605: actor $PLAYER_ACTOR perform_animation_sequence "FIGHTA_G" IFP_file "PED" 4.0 loop 0 0 0 0 time -1
00BC: show_text_highpriority GXT 'PTL06' time 15000 flag 1 
gosub @MISSN_01_290 //wait for wav to load
0968: actor $PLAYER_ACTOR stop_mouth
03CF: load_wav 45206 as 1 
gosub @MISSN_01_280 //wait for wav to load
03D1: play_wav 1 
0967: actor 15@ move_mouth -1 ms
0605: actor 15@ perform_animation_sequence "IDLE_STANCE" IFP_file "PED" 4.0 loop 0 0 0 0 time -1
00BC: show_text_highpriority GXT 'PTL07' time 15000 flag 1 
gosub @MISSN_01_290 //wait for wav to load
0968: actor 15@ stop_mouth
03CF: load_wav 45207 as 1 
gosub @MISSN_01_280 //wait for wav to load
03D1: play_wav 1 
0967: actor $PLAYER_ACTOR move_mouth -1 ms
0605: actor $PLAYER_ACTOR perform_animation_sequence "IDLE_STANCE" IFP_file "PED" 4.0 loop 0 0 0 0 time -1
00BC: show_text_highpriority GXT 'PTL08' time 15000 flag 1 
gosub @MISSN_01_290 //wait for wav to load
067C: put_camera_on_actor $PLAYER_ACTOR with_offset -0.3 2.0 1.0 rotation 0.0 0.0 0.0 0.0 2 
0968: actor $PLAYER_ACTOR stop_mouth
03CF: load_wav 45208 as 1 
gosub @MISSN_01_280 //wait for wav to load
03D1: play_wav 1 
0967: actor 15@ move_mouth -1 ms
0605: actor 15@ perform_animation_sequence "IDLE_CHAT" IFP_file "PED" 4.0 loop 0 0 0 0 time -1
00BC: show_text_highpriority GXT 'PTL09' time 15000 flag 1 
gosub @MISSN_01_290 //wait for wav to load
0968: actor 15@ stop_mouth
03CF: load_wav 45209 as 1 
gosub @MISSN_01_280 //wait for wav to load
03D1: play_wav 1 
0967: actor $PLAYER_ACTOR move_mouth -1 ms
0605: actor $PLAYER_ACTOR perform_animation_sequence "IDLE_STANCE" IFP_file "PED" 4.0 loop 0 0 0 0 time -1
00BC: show_text_highpriority GXT 'PTL10' time 15000 flag 1 
gosub @MISSN_01_290 //wait for wav to load
0968: actor $PLAYER_ACTOR stop_mouth
03CF: load_wav 45210 as 1 
gosub @MISSN_01_280 //wait for wav to load
03D1: play_wav 1 
0967: actor 16@ move_mouth -1 ms
0605: actor 16@ perform_animation_sequence "IDLE_CHAT" IFP_file "PED" 4.0 loop 0 0 0 0 time -1
00BC: show_text_highpriority GXT 'PTL11' time 15000 flag 1 
gosub @MISSN_01_290 //wait for wav to load
0968: actor 16@ stop_mouth
00BE: text_clear_all 
return

//Cut Scene 02 "The Requiem"
:MISSN_01_210
03CF: load_wav 45211 as 1 
gosub @MISSN_01_280 //wait for wav to load
03D1: play_wav 1 
0967: actor $PLAYER_ACTOR move_mouth -1 ms
00BC: show_text_highpriority GXT 'PTL14' time 15000 flag 1 
gosub @MISSN_01_290 //wait for wav to load
0605: actor 17@ perform_animation_sequence "IDLE_CHAT" IFP_file "PED" 4.0 loop 0 0 0 0 time -1
0968: actor $PLAYER_ACTOR stop_mouth
03CF: load_wav 45212 as 1 
gosub @MISSN_01_280 //wait for wav to load
03D1: play_wav 1              
0967: actor 17@ move_mouth -1 ms
00BC: show_text_highpriority GXT 'PTL15' time 15000 flag 1 
gosub @MISSN_01_290 //wait for wav to load
0968: actor 17@ stop_mouth
03CF: load_wav 45213 as 1 
gosub @MISSN_01_280 //wait for wav to load
05D3: AS_actor 17@ goto_point 2510.0 -2088.0 13.5757 mode 4 -1 ms   
03D1: play_wav 1 
0967: actor $PLAYER_ACTOR move_mouth -1 ms
00BC: show_text_highpriority GXT 'PTL16' time 15000 flag 1 
gosub @MISSN_01_290 //wait for wav to load
0968: actor $PLAYER_ACTOR stop_mouth
03CF: load_wav 45214 as 1 
gosub @MISSN_01_280 //wait for wav to load
03D1: play_wav 1 
0967: actor 17@ move_mouth -1 ms
00BC: show_text_highpriority GXT 'PTL17' time 15000 flag 1 
gosub @MISSN_01_290 //wait for wav to load 
0968: actor 17@ stop_mouth
03CF: load_wav 45215 as 1 
gosub @MISSN_01_280 //wait for wav to load
03D1: play_wav 1 
0967: actor $PLAYER_ACTOR move_mouth -1 ms
0605: actor $PLAYER_ACTOR perform_animation_sequence "IDLE_STANCE" IFP_file "PED" 4.0 loop 0 0 0 0 time -1
00BC: show_text_highpriority GXT 'PTL18' time 15000 flag 1 
gosub @MISSN_01_290 //wait for wav to load
0968: actor $PLAYER_ACTOR stop_mouth
03CF: load_wav 45216 as 1 
gosub @MISSN_01_280 //wait for wav to load
03D1: play_wav 1 
0967: actor 16@ move_mouth -1 ms
00BC: show_text_highpriority GXT 'PTL19' time 15000 flag 1 
gosub @MISSN_01_290 //wait for wav to load
03CF: load_wav 45217 as 1 
gosub @MISSN_01_280 //wait for wav to load
03D1: play_wav 1              
00BC: show_text_highpriority GXT 'PTL20' time 15000 flag 1 
gosub @MISSN_01_290 //wait for wav to load
03CF: load_wav 45218 as 1 
gosub @MISSN_01_280 //wait for wav to load
03D1: play_wav 1 
0605: actor 16@ perform_animation_sequence "FIGHTA_G" IFP_file "PED" 4.0 loop 0 0 0 0 time -1
00BC: show_text_highpriority GXT 'PTL21' time 15000 flag 1 
gosub @MISSN_01_290 //wait for wav to load
0968: actor 16@ stop_mouth
03CF: load_wav 45219 as 1 
gosub @MISSN_01_280 //wait for wav to load
03D1: play_wav 1 
0967: actor $PLAYER_ACTOR move_mouth -1 ms
05D3: AS_actor 16@ goto_point 2513.0 -2086.0 13.5757 mode 4 3000 ms 
00BC: show_text_highpriority GXT 'PTL22' time 15000 flag 1 
gosub @MISSN_01_290 //wait for wav to load 
0968: actor $PLAYER_ACTOR stop_mouth
03CF: load_wav 45220 as 1 
gosub @MISSN_01_280 //wait for wav to load
03D1: play_wav 1 
00BC: show_text_highpriority GXT 'PTL23' time 15000 flag 1 
gosub @MISSN_01_290 //wait for wav to load 
03CF: load_wav 45221 as 1 
gosub @MISSN_01_280 //wait for wav to load
//Tenpenny fires one shot at camera
0668: AS_actor $PLAYER_ACTOR rotate_and_shoot_at 2510.4209 -2086.5657 13.0 500 ms 
03D1: play_wav 1 
//0967: actor $PLAYER_ACTOR move_mouth -1 ms
00BC: show_text_highpriority GXT 'PTL24' time 15000 flag 1 
gosub @MISSN_01_290 //wait for wav to load
00BE: text_clear_all 
return

//Subroutine to wait for wave loading
:MISSN_01_280
wait 0
if  
03D0:   wav 1 loaded 
jf @MISSN_01_280
return

//Subroutine to wait for the wav to play out
:MISSN_01_290
wait 0
if 
03D2:   wav 1 ended 
jf @MISSN_01_290
040D: unload_wav 1
0001: wait $DEFAULT_WAIT_TIME ms
return

//The subroutine adjusts Pendelbury's speed as he moves from point to point                                       
//loading checkpoints into scmpath it allows you to slow down for tight turns
//and speed up in straight runs. 
//He sometimes would get stuck and make it too easy to kill him. I ended up reducing the traffic.
:MISSN_01_300 //The Chase
if
100@ == 0
then
    gosub @MISSN_01_310
    100@ = 1
end
if and
100@ == 1
00EE:   actor 15@ 0 near_point 1616.8341 -1708.2432 radius 5.0 5.0 in_car 
then
    gosub @MISSN_01_320
    100@ += 1
    03E5: show_text_box 'PTL13'  
end
if and
100@ == 2
00EE:   actor 15@ 0 near_point 1833.2645 -1817.8071 radius 5.0 5.0 in_car 
then
    gosub @MISSN_01_330
    100@ += 1
    03E6: remove_text_box 
end
if and
100@ == 3
00EE:   actor 15@ 0 near_point 2596.6501 -1857.2941 radius 5.0 5.0 in_car 
then
    gosub @MISSN_01_340
    100@ += 1
end
if and
100@ == 4
00EE:   actor 15@ 0 near_point 2625.2969 -1494.6492 radius 5.0 5.0 in_car 
then
    gosub @MISSN_01_350
    100@ += 1
end
if and
100@ == 5
00EE:   actor 15@ 0 near_point 2823.4824 -1487.0029 radius 5.0 5.0 in_car 
then
    gosub @MISSN_01_360
    100@ += 1
end  
if and
100@ == 6
00EE:   actor 15@ 0 near_point 2824.908 -1866.4448 radius 5.0 5.0 in_car 
then
    gosub @MISSN_01_370
    100@ += 1
end 
if and
100@ == 7
00EE:   actor 15@ 0 near_point 2162.4976 -2582.3545 radius 5.0 5.0 in_car 
then
    gosub @MISSN_01_380
    100@ += 1
end  
if and
100@ == 8
00EE:   actor 15@ 0 near_point 1383.7756 -2466.7612 radius 5.0 5.0 in_car 
then
    gosub @MISSN_01_600
    jump @MISSN_01_105
end  
//Checks to make sure you didn't wreck the patrol car
if
Car.Wrecked(13@)
then
    gosub @MISSN_01_600 
    jump @MISSN_01_105
end
return
 //scmpath seems to have a limit? so keep it to about 8 or 10 
 //This is the first way I learned to make a vehicle follow a set path you can see 
 //that later I used a different method in "Derby Maddnes" mission number 16. 
 //This method gives you much more control of the vehicle speed and route.
:MISSN_01_310
05D6: clear_scmpath 
05D7: add_point_to_scmpath 1527.5897 -1719.1304 13.4296
05D7: add_point_to_scmpath 1555.2362 -1734.1617 13.4124
05D7: add_point_to_scmpath 1603.719 -1734.9719 13.4136
05D7: add_point_to_scmpath 1609.3877 -1653.957 13.5762 
05D7: add_point_to_scmpath 1615.4048 -1663.8196 13.5589
05D7: add_point_to_scmpath 1616.8341 -1708.2432 4.4613
06BB: set_actor 15@ drive_car 14@ speed 15.0 along_SCM_path
return

:MISSN_01_320
05D6: clear_scmpath 
05D7: add_point_to_scmpath 1624.8857 -1767.3146 3.9915
05D7: add_point_to_scmpath 1833.2645 -1817.8071 4.0138
06BB: set_actor 15@ drive_car 14@ speed 30.0 along_SCM_path
return

:MISSN_01_330
05D6: clear_scmpath
05D7: add_point_to_scmpath 1925.098 -1830.64 5.7598
05D7: add_point_to_scmpath 1970.4095 -1837.9246 4.1215
05D7: add_point_to_scmpath 2058.146 -1852.7108 4.025
05D7: add_point_to_scmpath 2231.0232 -1847.6094 0.2432
05D7: add_point_to_scmpath 2231.0232 -1847.6094 0.2432 
05D7: add_point_to_scmpath 2357.467 -1875.3892 9.2914 
05D7: add_point_to_scmpath 2484.9414 -1874.5491 9.3438
05D7: add_point_to_scmpath 2596.6501 -1857.2941 3.7431
06BB: set_actor 15@ drive_car 14@ speed 50.0 along_SCM_path 
return

:MISSN_01_340
05D6: clear_scmpath
05D7: add_point_to_scmpath 2581.8804 -1780.326 1.7129
05D7: add_point_to_scmpath 2563.3955 -1734.6865 1.6726
05D7: add_point_to_scmpath 2625.2969 -1494.6492 16.4167
06BB: set_actor 15@ drive_car 14@ speed 60.0 along_SCM_path 
return

:MISSN_01_350
05D6: clear_scmpath
05D7: add_point_to_scmpath 2642.1267 -1463.182 16.2787
05D7: add_point_to_scmpath 2662.1497 -1440.866 16.2793
05D7: add_point_to_scmpath 2687.813 -1428.2909 16.2781
05D7: add_point_to_scmpath 2817.4121 -1420.2235 16.2779
05D7: add_point_to_scmpath 2824.2612 -1426.2661 16.2823
05D7: add_point_to_scmpath 2823.4824 -1487.0029 13.9649
06BB: set_actor 15@ drive_car 14@ speed 20.0 along_SCM_path 
return

:MISSN_01_360
05D6: clear_scmpath
05D7: add_point_to_scmpath 2901.364 -1497.5604 10.9249
05D7: add_point_to_scmpath 2847.092 -1701.1487 10.9145
05D7: add_point_to_scmpath 2824.908 -1866.4448 10.9562
06BB: set_actor 15@ drive_car 14@ speed 30.0 along_SCM_path 
return

:MISSN_01_370
05D6: clear_scmpath
05D7: add_point_to_scmpath 2824.6448 -2075.863 10.9615
05D7: add_point_to_scmpath 2768.9053 -2143.5269 10.9784
05D7: add_point_to_scmpath 2700.4832 -2152.1206 10.9415
05D7: add_point_to_scmpath 2472.1814 -2161.8223 13.7385
05D7: add_point_to_scmpath 2415.9954 -2180.1575 12.9518
05D7: add_point_to_scmpath 2313.4983 -2241.4648 12.9512
05D7: add_point_to_scmpath 2187.678 -2366.498 12.9549
05D7: add_point_to_scmpath 2162.4976 -2582.3545 12.9529
06BB: set_actor 15@ drive_car 14@ speed 65.0 along_SCM_path 
return

:MISSN_01_380
05D6: clear_scmpath
05D7: add_point_to_scmpath 2110.9365 -2654.6479 12.9524
05D7: add_point_to_scmpath 2036.8062 -2671.0964 11.5488
05D7: add_point_to_scmpath 1485.2981 -2667.4233 10.6779
05D7: add_point_to_scmpath 1357.3842 -2622.6316 12.9565
05D7: add_point_to_scmpath 1341.2065 -2549.5579 13.0887
05D7: add_point_to_scmpath 1357.3502 -2508.2749 12.7388
05D7: add_point_to_scmpath 1360.9703 -2481.2742 8.4044
05D7: add_point_to_scmpath 1383.7756 -2466.7612 6.4645
06BB: set_actor 15@ drive_car 14@ speed 45.0 along_SCM_path 
return

//Set up the Killzone Cutscene
:MISSN_01_400
0395: clear_area 1 at 2510.4209 -2086.5657 13.5757 radius 50.0 
0169: set_fade_color_RGB 0 0 0 
fade 0 1000 

:MISSION_01_410
wait 0
if 
816B:   not fading 
jf @MISSION_01_410

fade 0 0

if 
Actor.Driving(15@)
then
0362: remove_actor 15@ from_car_and_place_at 2510.0 -2086.0 12.5757
end
if 
Actor.Driving(16@)
then
0362: remove_actor 16@ from_car_and_place_at 2515.0 -2086.5 13.5757
end
if 
Actor.Driving(17@)
then
0362: remove_actor 17@ from_car_and_place_at 2515.0 -2088.5 13.5757
end
if 
Actor.Driving($PLAYER_ACTOR)
then
0362: remove_actor $PLAYER_ACTOR from_car_and_place_at 2515.0 -2087.0 13.5757
end
Actor.PutAt(15@, 2510.0, -2086.0, 12.5757)
Actor.Angle(15@) = 180.0
Actor.Health(15@) = 0     // He's dead Jim.
Actor.PutAt($PLAYER_ACTOR, 2515.0, -2087.0, 13.5757)
Actor.PutAt(16@, 2515.0, -2086.5, 13.5757)
Actor.PutAt(17@, 2515.0, -2088.5, 13.5757)

05D3: AS_actor $PLAYER_ACTOR goto_point 2512.5 -2087.0 13.5757 mode 4 1500 ms
05D3: AS_actor 16@ goto_point 2512.0 -2086.5 13.5757 mode 4 1000 ms
05D3: AS_actor 17@ goto_point 2513.5 -2088.5 13.5757 mode 4 1000 ms
:MISSION_01_415
wait 0
if 
00ED:   actor $PLAYER_ACTOR 0 near_point 2512.5 -2087.0 radius 0.5 0.5 on_foot 
jf @MISSION_01_415

Actor.Angle($PLAYER_ACTOR) = 90.0
Actor.Angle(16@) = 130.0
Actor.Angle(17@) = 45.0
0674: set_car_model #COPCARLA numberplate "_CRASH_"
13@ = Car.Create(#COPCARLA,  2504.9629, -2102.1897, 13.1238)
Car.Angle(13@) = 59.5647                       
Car.DoorStatus(13@, 0)                   
053F: set_car 13@ tires_vulnerability 0  

01B9: set_actor $PLAYER_ACTOR armed_weapon_to 25 
06A9: AS_actor $PLAYER_ACTOR look_at_point 2510.4209 -2086.5657 13.0 -1 ms 
06A9: AS_actor 16@ look_at_point 2510.4209 -2086.5657 13.0 -1 ms 
06A9: AS_actor 16@ look_at_point 2510.4209 -2086.5657 13.0 -1 ms 

02A3: enable_widescreen True

Camera.SetPosition(2510.4209, -2086.5657, 13.0, 0.0, 0.0, 0.0)
Camera.PointAt(2512.7, -2087.0, 14.0, 2)
Player.SetDrunkVisuals($PLAYER_CHAR, 200)

fade 1 1000 

:MISSN_01_420
wait 0
if 
816B:   not fading 
jf @MISSN_01_420

0707: start_scene_skip_to @MISSN_01_430 
gosub @MISSN_01_210  //Final talk
:MISSN_01_430 
0701: end_scene_skip 
02A3: enable_widescreen False 
03E6: remove_text_box 
00BE: text_clear_all  
06AB: set_actor 16@ all_weapons_hidden 1 
06AB: set_actor 17@ all_weapons_hidden 1 
   
Player.SetDrunkVisuals($PLAYER_CHAR, 0)
Camera.Restore_WithJumpCut
Camera.SetBehindPlayer

gosub @MISSN_01_890  //Sucess!
jump @MISSN_01_105   //End Thread
 
:MISSN_01_600
00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1  // ~r~MISSION FAILED!
//This is point to return to the station and retry the mission.
$CRASH_MARKER = Marker.CreateIconAndSphere(16, 1541.156, -1675.352, 13.552)
return

:MISSN_01_890
$MISSION_TP += 1
$CRASH_TOTAL_PASSED_MISSIONS += 1 
030C: progress_made += 1 
0394: play_music 1 
Player.ClearWantedLevel($PLAYER_CHAR)
01E3: show_text_1number_styled GXT 'M_PASSR' number 7 time 5000 style 1  // MISSION PASSED!~n~~w~RESPECT +
0998: add_respect 1 
$CRASH_MARKER = Marker.CreateIconAndSphere(16, 1728.5, -2251.8508, -3.2548)
034F: destroy_actor_with_fade 16@ 
034F: destroy_actor_with_fade 17@ 
return 

:MISSN_01_900
$ONMISSION = 0 
01BD: $CURRENT_TIME_IN_MS = current_time_in_ms

0164: disable_marker 90@ 
mission_cleanup 
return 
